package com.example.mybatisdemo2.demos.web.mapper;

import com.example.mybatisdemo2.demos.web.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author Q
 * @create 2025-06-09-16:32
 */
@Mapper
public interface ArticleInfoMapper {
    //实现代码
    @Select("select ta.*, tb.username, tb.age from articleinfo ta" +
            " left join userinfo tb on ta.uid=tb.id" +
            " where ta.id= #{articleId}")
    ArticleInfo queryArticleInfo(Integer articleId);
}
